A common feature in conventional micro-controllers and microprocessors is a watchdog function circuit. Typically, the watchdog function circuit includes circuitry that monitors error signals from various self-testing functions of the micro-controller or microprocessor. The self-testing functions can include, for example, a counter overflow bit, a checksum discrepancy computational bit or other test function. The watchdog function circuit provides an enable signal that is actively updated based on the completion of the various self-testing functions of the micro-controller or microprocessor. If one or more of the self-testing functions fail, the enable signal from the watchdog function circuit is required to change state in a fail-safe manner.
Typically, conventional micro-controllers and microprocessors implement the watchdog function circuit by allowing the setting of time constants that correspond to the update rate of the self-testing function of the micro-controller or microprocessor. The time constants for the update rates of the self-testing function require large capacitance values, and the capacitors required for the large capacitance values are not economically formed into integrated circuits on a semiconductor microchip. Therefore, conventional micro-controller and microprocessor must implement the watchdog function circuit via circuitry that is not integrated onto a semiconductor microchip. As such, typical watchdog function circuits are implemented externally from the micro-controller or microprocessor. As a result, these external watchdog function circuits increase the cost of micro-controller and/or microprocessor systems because the watchdog function cannot be economically formed as a integrated circuit on a semiconductor microchip.
Therefore, it is desired to provide a watchdog function circuit that can be formed as an integrated circuit on a semiconductor microchip. It is further desired to provide a watchdog function circuit that is integrated on the same semiconductor microchip as the micro-controller and/or microprocessor such that production costs and complexity involved in producing these systems can be reduced.
In one representative embodiment, an on-chip watchdog circuit provides an output signal when an error signal that is generated by a circuit under test is detected. The on-chip watchdog circuit comprises a clock signal generator that generates a clock signal. A NOR gate is connected to the clock signal generator, and the NOR gate receives the clock signal and the error signal generated by the circuit under test. A gate output circuit is connected to an output of the NOR gate. A capacitor is connected between the gate output circuit and ground. A resistor is connected between the capacitor and ground. A comparator is connected to the resistor. The comparator is also connected to a voltage divider. The comparator provides the output signal in response to the error signal generated by the circuit under test. The on-chip watchdog circuit and the circuit under test are integrated on a semiconductor microchip.